package com.zkjl.protect_business.entity;

import com.zkjl.protect_business.entity.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.util.List;

@Data
@ApiModel(description = "模板实体")
@Document(indexName = "pb_business_jichuxinxi_changyongmoban", shards = 1, replicas = 0)
public class Template extends BaseEntity {

    /**
     * 模板id
     */
    @Id
    @ApiModelProperty(notes = "id")
    private String id;

    @ApiModelProperty(notes = "模板名称")
    @Field(name = "template_name", type = FieldType.Keyword)
    private String templateName;

    @ApiModelProperty(notes = "类型 word excel")
    @Field(type = FieldType.Keyword)
    private String type;

    @ApiModelProperty(notes = "模板文件id")
    @Field(name = "file_id", type = FieldType.Keyword)
    private String fileId;

    @ApiModelProperty(notes = "所属业务类别名称")
    @Field(type = FieldType.Keyword)
    private String business;

    @ApiModelProperty(notes = "所属业务类别id")
    @Field(name = "business_id", type = FieldType.Keyword)
    private String businessId;

    @ApiModelProperty(notes = "描述")
    @Field(type = FieldType.Keyword)
    private String describe;

    @ApiModelProperty(notes = "文件hsah")
    @Field(type = FieldType.Keyword)
    private String hash;

    @ApiModelProperty(notes = "包含字段")
    @Field(type = FieldType.Object)
    private List<DocField> fields;


}
